//
//  TestResultCell.m
//  MIDI
//
//  Created by E.M.Game on 15/10/8.
//  Copyright (c) 2015年 QXSX. All rights reserved.
//

#import "TestResultCell.h"
#import "CommFunc.h"

@implementation TestResultCell

- (void)awakeFromNib {
    // Initialization code
    
    self.judgeTeacherBigBtn.hidden = YES;
    self.judgeTeacherLittleBtn.hidden = YES;
    self.payBtn.hidden = YES;
    
    [self.payBtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    //[super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+(id)loadFromXib
{
    NSString *nibName = NSStringFromClass([self class]);
    return [[[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil] firstObject];
}

-(int)getHeight
{
    int height = [CommFunc sizeWithString:self.addrLb.text
                                     font:[UIFont fontWithName:@"Hiragino Sans GB" size:12]
                                      max:CGSizeMake(self.addrLb.frame.size.width, MAXFLOAT)].height;
    
    if (height <= 0)
        return 84;
    else
    {
        height = self.frame.size.height + height;
        
        return height;
    }
    
    return 0;
}

-(void)initBtnHidden:(BOOL)flag
{
    self.socreLb.hidden = flag;
    self.worsdLb.hidden = flag;
    self.testItemImg.hidden = flag;
    self.testNameLb.hidden = flag;
    self.testResultBtn.hidden = flag;
    self.testLevelLb.hidden = flag;
    self.addrLb.hidden = flag;
    self.testTimeLb.hidden = flag;
    self.phoneNumLb.hidden = flag;
    self.detailLb.hidden = flag;
    self.judgeTeacherBigBtn.hidden = flag;
    self.judgeTeacherLittleBtn.hidden = flag;
    self.payBtn.hidden = flag;
    self.reciveCertificateBtn.hidden = flag;
}

@end


















